﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第116题
//BC118 小乐乐与序列
//https://www.nowcoder.com/practice/9a1c1c764ce04fed8ceff7714e74d3b6?tpId=107&tqId=33399&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    int n = 0;
    int arr[100000] = { 0 };
    scanf("%d", &n);
    int i = 0;
    int tmp = 0;
    //数组对应位置下标的值等于该值
    //也就是数组下标是1，就对应1
    //因为输入大于0，所以为0的都不打印。
    for (i = 1; i <= n; i++) {
        scanf("%d", &tmp);
        arr[tmp] = tmp;
    }
    for (i = 0; i < n; i++) {
        if (arr[i] != 0) {
            printf("%d ", arr[i]);
        }
    }

    return 0;
}